Skip to content

Add explicit Enter/Escape keyboard hints to EFG edit popups - #1106

Merged
tturocy merged 4 commits into
masterfrom
copilot/add-keyboard-hints-to-gambit-gui
Sep 2, 2026
Merged

Add explicit Enter/Escape keyboard hints to EFG edit popups#1106
tturocy merged 4 commits into
masterfrom
copilot/add-keyboard-hints-to-gambit-gui

Conversation

Copilot AI commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Thanks for contributing to Gambit! Before you submitting or reviewing a pull request, check out our guidelines for contributing.

The person submitting the PR should ensure it has an informative title and update the headers below, before marking the PR as ready for review and assigning reviewers.

Issues closed by this PR

Issue linking is handled automatically.

Description of the changes in this PR

This PR makes keyboard accept/cancel behavior explicit in EFG edit popups, alongside the existing tab-navigation guidance for action entry. The goal is to make non-modal popup controls discoverable without changing interaction semantics.

  • Append/Insert move popup (AppendMovePopup)
    • Extends the existing hint under the action grid from one line to two lines.
    • Keeps the original tab-growth hint and adds explicit Enter/Escape behavior.
  • Outcome editor popup (OutcomeEditorPopup)
    • Adds matching Enter/Escape hint text under the payoff grid.
    • Applies the same hint styling (gray text, reduced font size) for consistency.
  • Hint text consistency
    • Normalizes punctuation in the existing tab hint line.
_("Tab past the last action to add another.\nEscape cancels and closes this window. Enter accepts.")
_("Escape cancels and closes this window. Enter accepts.")

How to review this PR

  • Open the EFG GUI and trigger:
    • Append/Insert move popup
    • Edit/New outcome popup
  • Verify the hint text appears below the input grid in both windows.
  • Confirm behavior matches text:
    • Escape cancels/closes
    • Enter accepts
    • In append/insert move, tabbing past the last action still adds a new action row.

Copilot AI and others added 2 commits September 1, 2026 15:25
Co-authored-by: rahulsavani <743139+rahulsavani@users.noreply.github.com>
Co-authored-by: rahulsavani <743139+rahulsavani@users.noreply.github.com>
@rahulsavani

Copy link
Copy Markdown
Member

@copilot Ensure the "Linters and coding standards checks" pass.

Co-authored-by: rahulsavani <743139+rahulsavani@users.noreply.github.com>

Copilot AI commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Ensure the "Linters and coding standards checks" pass.

Addressed in commit ced1c5b. I fixed the clang-format violation in src/gui/efgtooltip.cc and verified the file now matches clang-format output.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Gambit’s EFG GUI edit popups to make existing keyboard accept/cancel behavior (Enter/Escape) explicitly discoverable via on-screen hint text, aligning it with the existing tab-navigation guidance.

Changes:

  • Add an Enter/Escape hint line to the Append/Insert move popup’s existing hint text (and normalize punctuation).
  • Add a matching Enter/Escape hint under the Outcome editor popup’s payoff grid, using the same subdued styling (gray + slightly smaller font).
Suppressed comments (1)

src/gui/efgtooltip.cc:841

  • m_hintText now includes a second (potentially long) sentence and is translatable. Consider calling Wrap(...) to prevent the popup from expanding horizontally and to handle longer translations more gracefully (matching the existing m_errorText->Wrap(FromDIP(260))).
  m_hintText->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT));
  wxFont hintFont = m_hintText->GetFont();
  hintFont.SetPointSize(hintFont.GetPointSize() - 1);
  m_hintText->SetFont(hintFont);
  outerSizer->Add(m_hintText, 0, wxALL, FromDIP(10));

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/gui/efgtooltip.cc
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@rahulsavani
rahulsavani marked this pull request as ready for review September 1, 2026 17:08
@rahulsavani
rahulsavani requested a review from tturocy September 1, 2026 17:08
@tturocy
tturocy merged commit 88abac3 into master Sep 2, 2026
26 checks passed
@tturocy
tturocy deleted the copilot/add-keyboard-hints-to-gambit-gui branch September 2, 2026 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants